import java.util.Scanner;

public class Test2 {
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String[] strings = str1.split(" ");
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = strings.length -1; i  > 0; i--) {
            stringBuffer.append(strings[i]);
            stringBuffer.append(" ");
        }
        stringBuffer.append(strings[0]);
        System.out.println(stringBuffer);

    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        char[] chars = str1.toCharArray();
        Myreverse(chars,0,chars.length);

    }

    private static void Myreverse(char[] chars, int i, int length) {
        
    }
}

